import 'package:fish_redux/fish_redux.dart';
import 'action.dart';
import 'state.dart';
import '../../../app_files.dart';

Effect<BannerComponentState> buildEffect() {
  return combineEffects(<Object, Effect<BannerComponentState>>{
    BannerComponentAction.action: _onAction,
    BannerComponentAction.onTap: _onTap,
  });
}

void _onAction(Action action, Context<BannerComponentState> ctx) {}

void _onTap(Action action, Context<BannerComponentState> ctx) {
  BannerModel model = action.payload;
  String url = model.url;
//  JsHelper.openWindow(url, title: '详情');
}
